#ifndef __GAF_LAYOUT_H__
#define __GAF_LAYOUT_H__

#include "GAF_Define.h"

namespace GAF
{
	class Layout; //-* ForEach
}
typedef GAF::Layout		GAF_CLayout;

#include "GAF_Face.h"

namespace GAF
{
	/// 场景使用界面类
	class _ABSTRACT Layout : public Face
	{
	private:
		typedef STD_MAP<STD_STRING, Graphics*>
					GraphicsMap;

	public:
		Layout();
		virtual ~Layout();

	public:
		void			Destroy();

	protected:
		/// 当初始化时
		virtual bool		OnInit(GAF_CBundle* pbdlParam) = 0;			// 当 界面初始化 时
		/// 当销毁时
		virtual void		OnDestroy()
					{return;}
		/// 获取指定名字可绘制对象
		virtual Graphics*	GetGraphicsByName(STD_STRING strGraphicsName, int nParam1 = 0, int nParam2 = 0);

	public:
		void			AddGraphics(Graphics* pGraphics, bool isBack = false);
		Graphics*		GetGraphics(STD_STRING strGraphicsName);

	private:
		void			CheckGraphics(Graphics* pGraphics);

	protected:
// 		GraphicsList		m_lstGraphicses;
		GraphicsMap		m_mapGraphicses;
	};
}

#endif
